package com.csh.order.rabbitMq;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OrdreRabbitMq {
   @Bean
    public TopicExchange topicExchange(){
       return new TopicExchange("public_Jh_topic");
   }
   @Bean
    public Queue goodsQueue(){
       return new Queue("goods_Queue");
   }
   @Bean
    public Binding build(){
       return BindingBuilder.bind(goodsQueue()).to(topicExchange()).with("bing_goods");
   }

}
